package routers

import (
	Article "gin_blog/apps/article"
	Comment "gin_blog/apps/comment"
	User "gin_blog/apps/user"
	UserInfo "gin_blog/apps/userinfo"
	"github.com/gin-gonic/gin"
)

func RootRouter(router *gin.Engine) {
	v1 := router.Group("/api/v1")
	{
		user := v1.Group("/users")
		userInfo := v1.Group("/userinfos")
		article := v1.Group("/articles")
		comment := v1.Group("/comments")
		User.Router(user)
		UserInfo.Router(userInfo)
		Article.Router(article)
		Comment.Router(comment)
	}

}

